
<template>
    <div>
        <router-link to="/TestLend" style="float: right">
            <el-button type="danger" icon="close" size="mini" class="bolder outsideBtnBS"></el-button>
        </router-link>
        <div class="block" style="margin-bottom: 10px">
            <span class="wrapper">
                <el-button type="danger" size="mini" :disabled="selectDisabled" class="bolder outsideBtnBS selectAll" style="margin-left:0!important;" v-text="nowLangue.save"><!--保存--></el-button>
                <el-button type="danger" size="mini" :disabled="selectDisabled" class="bolder outsideBtnBS selectAll" v-text="nowLangue.submit"><!--提交--></el-button>
            </span>
        </div>
        <el-form :inline="true" :model="formInline" ref="formInline" style="border-bottom:1px solid #ccc;">
            <!-- 检验商名称-->
            <el-form-item :label="nowLangue.surveyorName" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--检验出库申请单号-->
            <el-form-item :label="nowLangue.surveyOutCode" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--申请人-->
            <el-form-item :label="nowLangue.applyor" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--申请时间-->
            <el-form-item :label="nowLangue.applyTime" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--质检类别-->
            <el-form-item :label="nowLangue.qualiTestClass" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--出库库房-->
            <el-form-item :label="nowLangue.outStore" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--出库库区-->
            <el-form-item :label="nowLangue.outArea" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
            <!--RMC类别-->
            <el-form-item :label="nowLangue.rmcClass" class="selectMB10">
                <el-select size="mini" clearable v-model="formInline.status" :placeholder="nowLangue.pleaseSelect">
                    <el-option v-for="(status,index) in statusList" :key="index" :label="status.label" :value="status.value"></el-option>
                </el-select>
            </el-form-item>
            <!--需要运输-->
            <el-form-item :label="nowLangue.transfer" class="selectMB10">
                <el-select size="mini" clearable v-model="formInline.status" :placeholder="nowLangue.pleaseSelect">
                    <el-option v-for="(status,index) in statusList" :key="index" :label="status.label" :value="status.value"></el-option>
                </el-select>
            </el-form-item>
            <!--入库库房-->
            <el-form-item :label="nowLangue.inStore" class="selectMB10">
                <el-select size="mini" clearable v-model="formInline.status" :placeholder="nowLangue.pleaseSelect">
                    <el-option v-for="(status,index) in statusList" :key="index" :label="status.label" :value="status.value"></el-option>
                </el-select>
            </el-form-item>
            <!--入库库区-->
            <el-form-item :label="nowLangue.inArea" class="selectMB10">
                <el-select size="mini" clearable v-model="formInline.status" :placeholder="nowLangue.pleaseSelect">
                    <el-option v-for="(status,index) in statusList" :key="index" :label="status.label" :value="status.value"></el-option>
                </el-select>
            </el-form-item>
            <!--说明-->
            <el-form-item :label="nowLangue.describetion" class="selectMB10">
                <el-input size="mini" v-model="formInline.name"></el-input>
            </el-form-item>
        </el-form>
        <label class="default-label" v-text="nowLangue.applyDetail"><!--检验出库申请明细--></label>
        <el-table :data="quliTestData" border style="width: 100%;" v-loading.body="loading" :element-loading-text="nowLangue.loadDesperately" @selection-change="handleSelectedEngReplace">
            <el-table-column type="index" header-align="center" align="center" :label="nowLangue.sequence" width="40"></el-table-column>
            <!--操作-->
            <el-table-column type="selection" align="center" width="40"></el-table-column>
            <!--加急-->
            <el-table-column prop="" :label="nowLangue.urgent" header-align="center" show-overflow-tooltip></el-table-column>
            <!--备件编码-->
            <el-table-column prop="" :label="nowLangue.spareCode" header-align="center" show-overflow-tooltip></el-table-column>
            <!--备件名称-->
            <el-table-column prop="" :label="nowLangue.spareName" header-align="center"  show-overflow-tooltip></el-table-column>
            <!--备件技服条码-->
            <el-table-column prop="" :label="nowLangue.jiFuBarCode" header-align="center"  show-overflow-tooltip></el-table-column>
            <!--备件供应商条码-->
            <el-table-column prop="" :label="nowLangue.supplierBarCode" header-align="center"  show-overflow-tooltip></el-table-column>
            <!--备件标识-->
            <el-table-column prop="" :label="nowLangue.spareIdentify" header-align="center" show-overflow-tooltip></el-table-column>
            <!--收货数量-->
            <el-table-column prop="" :label="nowLangue.receiveCount" header-align="center" show-overflow-tooltip></el-table-column>
            <!--收货时间-->
            <el-table-column prop="" :label="nowLangue.receiveTime" header-align="center" show-overflow-tooltip></el-table-column>
            <!--在库时长（小时）-->
            <el-table-column prop="" :label="nowLangue.inStoreHours" header-align="center" show-overflow-tooltip></el-table-column>
            <!--备件小类-->
            <el-table-column prop="" :label="nowLangue.spareClass" header-align="center" show-overflow-tooltip></el-table-column>
            <!--计划大类-->
            <el-table-column prop="" :label="nowLangue.planClass" header-align="center" show-overflow-tooltip></el-table-column>
            <!--产品线-->
            <el-table-column prop="" :label="nowLangue.productLine" header-align="center" show-overflow-tooltip></el-table-column>
            <!--收货人-->
            <el-table-column prop="" :label="nowLangue.receiveMan" header-align="center" show-overflow-tooltip></el-table-column>
            <!--收货单号-->
            <el-table-column prop="" :label="nowLangue.receiveCode" header-align="center" show-overflow-tooltip></el-table-column>
        </el-table>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                language:{
                    zh:{
                        "save":"保存",
                        "submit":"提交",
                        "surveyorName":"检验商名称",
                        "surveyOutCode":"检验出库申请单号",
                        "applyor":"申请人",
                        "applyTime":"申请时间",
                        "qualiTestClass":"质检类别",
                        "outStore":"出库库房",
                        "outArea":"出库库区",
                        "transfer":"需要运输",
                        "rmcClass":"RMC类别",
                        "inStore":"入库库房",
                        "inArea":"入库库区",
                        "describetion":"说明",
                        "applyDetail":"检验出库申请明细",
                        "urgent":"加急",
                        "receiveCount":"收货数量",
                        "spareClass":"备件小类",
                        "planClass":"计划大类",
                        "productLine":"产品线",
                        "spareCode":"备件编码",
                        "spareName":"备件名称",
                        "sequence":"序",
                        "jiFuBarCode":"备件技服条码",
                        "supplierBarCode":"备件供应商条码",
                        "spareIdentify":"备件标识",
                        "receiveTime":"收货时间",
                        "inStoreHours":"在库时长(小时)",
                        "receiveMan":"收货人",
                        "receiveCode":"收货单号"
                    },
                    en:{
                        "save":"save",
                        "submit":"submit",
                        "surveyorName":"surveyorName",
                        "surveyOutCode":"surveyOutCode",
                        "applyor":"applyor",
                        "applyTime":"applyTime",
                        "qualiTestClass":"qualiTestClass",
                        "outStore":"outStore",
                        "outArea":"outArea",
                        "transfer":"transfer",
                        "rmcClass":"rmcClass",
                        "inStore":"inStore",
                        "inArea":"inArea",
                        "describetion":"describetion",
                        "applyDetail":"applyDetail",
                        "urgent":"urgent",
                        "receiveCount":"receiveCount",
                        "spareClass":"spareClass",
                        "planClass":"planClass",
                        "productLine":"productLine",
                        "spareCode":"spareCode",
                        "spareName":"spareName",
                        "sequence":"sequence",
                        "jiFuBarCode":"jiFuBarCode",
                        "supplierBarCode":"supplierBarCode",
                        "spareIdentify":"spareIdentify",
                        "receiveTime":"receiveTime",
                        "inStoreHours":"inStoreHours(Hour)",
                        "receiveMan":"receiveMan",
                        "receiveCode":"receiveCode"
                    }
                },
                nowLangue:{},
                // 查询表单
                formInline:{

                }
            };
        },
        created:function(){
            var _this=this;
            _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
        },
        computed:{
            languageType(){
                return this.$store.state.languageType;
            }
        },
        watch:{
            languageType(){
                var _this=this;
                _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
            }
        },
        //进入页面立即运行此方法
        mounted: function () {
            var _this = this;
            _this.$store.commit('currentActive', 'IqcOutApply');
            //ajax前后查询按钮禁用
            $(".selectAll").ajaxStart(function(){
                _this.selectDisabled=true;
            });
            $(".selectAll").ajaxStop(function(){
                _this.selectDisabled=false;
            });
        },
        methods:{

        }
    }
</script>